home *** CD-ROM | disk | FTP | other *** search
/ 2,000 Greater & Lesser Mysteries / 2,000 Greater and Lesser Mysteries.iso / computer / virus / mys00458.txt < prev    next >
Encoding:
Text File  |  1994-06-10  |  11.7 KB  |  224 lines

  1. ////////////////////////////////////////////////////////////////////////////
  2. from Meridian Systems, Haslett (Lansing), Michigan
  3. multi-line service
  4. Dr. Gordon Williams sysop (517) 339-3783
  5.                           (517) 339-0091, etc., overflow
  6.  
  7. Meridian systems serves as the format for State Senator William Sederburg's
  8. "Political Forum".  Dr. Williams and Dr. Ken Salzman host a Human Services 
  9. Forum.  Dr. Glenn Keeney of MSU's Computer Science department hosts discussion 
  10. of programming and provides downloads from "Computer Language" and "AI Expert" 
  11. magazines. 
  12.  
  13. UPCO is a local computer user group that contracted BBS services in order to 
  14. support their club.  Message base 8 was opened for discussion of viruses. 
  15.  
  16. Lawrence Kestenbaum served as a County Commissioner for several years before 
  17. moving on to grad school at Cornell.  He provided a copy of the Jerusalem B 
  18. virus.
  19.  
  20. Mike Marotta (:-) is a technical writer.  His works have appeared in magazines 
  21. for IBM and Data General users, Defense Computing, Plan & Print, etc.  He is 
  22. the author of a book on codes and ciphers. 
  23. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  24.  
  25. Msg#:39943 *UPCO Discussion*
  26. 09-24-89 13:03:21
  27. From: MIKE MAROTTA
  28.   To: LAWRENCE KESTENBAUM (Rcvd)
  29. Subj: JERUSALEM B
  30. I spent the morning with Jerusalem B and these are my preliminary results.
  31.         Naturally, I made backups, etc.  I even made a new DOS diskette to use.
  32. I gathered to this diskette some utilities such as LW86 (displays assembler 
  33. mnemonics and their syntax), CALC (for hex arithmetic), LIST and BROWSE, 
  34. FSDEBUG and plain old DEBUG, etc.  I used the infected files to build a "dirty"
  35. diskette with NU.EXE, COMP, and some of my own COM and EXE programs.  XDIR.EXE 
  36. was written in C by a friend of mine.  I wrote RED.COM, BLUE.COM and 
  37. PRTSCR.COM.  RED and BLUE are 32 bytes each and change the screen colors. 
  38. PRTSCR is 4 bytes and does a "print screen".
  39.         I found that NU.EXE reaches a top limit of 155k bytes (started at 
  40. 148K).  About 5 re-infections seems to be the limit.  COM files were infected 
  41. just once each.  Re-infection, growth in file size) did not occur.
  42.         Here's what I see happening.  You run a dirty program.  It goes to 
  43. MEMORY and alters the image of COMMAND.COM.  When you run a clean program, it 
  44. gets infected.  When the date is Oct 13, 1989 and you run an EXE or a COM, the 
  45. file deletes itself.  Some of these (XDIR, e.g.) ran once on "Oct 13" but then 
  46. erased themselves on the second call.
  47.         Here is what is NOT happening.  You run a dirty program and it infects 
  48. all COM and EXE files.  I ran NU.EXE time after time.  WHile NU got bigger, 
  49. nothing else did.
  50.         If you run a clean program AFTER a dirty program has been run, the 
  51. clean program gets infected.
  52.         Because PRTSCR.COM, etc., are so small, I'll know in a few spare time 
  53. hours, just what the viral code is.  (more later)
  54.  
  55.  
  56. Msg#:39950 *UPCO Discussion*
  57. 09-25-89 01:05:45
  58. From: MIKE MAROTTA
  59.   To: LAWRENCE KESTENBAUM (Rcvd)
  60. Subj: JERUSALEM B
  61. (Jesuralem is also easy to type and it even contains JESU...)
  62. *
  63.         I spent a total of 8 hours with JB, drank a beer, passed out and here I
  64. am 6 hours later.  Some details.  EXEs keep getting infected, at least some of 
  65. them can.  COMs get infected once.  I wrote a program to output the letter A. 
  66. As a COM file it grew once.   The program to output the letter Z, left as an 
  67. EXE grew until it crashed.  (CLean it took only 32 bytes.  Maybe the small 
  68. size, you see.)  Now, ATTRIB.EXE grows forever, but it starts at, what? 6K? I 
  69. got it up to 22K and still hoggin'.  The increment is 1808 bytes.
  70. *
  71.         I listed the disassembled code (hope that doesn't violate the implicit 
  72. contract I entered into when I took the diskette out of the sleeve) via 
  73. DIS86PC.  (Some work here...Data and Code being equal, DIS86PC had some 
  74. interesting opinions about how to "execute" the "program fragment" COMMAND.COM)
  75. The virus opens with a JUMP, so I took it from that argument, byte 195 forward.
  76. *
  77.         I found the TSR function, a DATE function, lots of read and write 
  78. functions, a few interrrupt vectors and lots of calls to memory locations near 
  79. 0000:0000 to 0000:001F.  (Oddly enough the DATE checks only for the YEAR 1987. 
  80. I have yet to find 0A 0D = 10 13 but we'll see what tomorrow brings.)
  81.         You know that looks a lot like 0D 0A, the CR LF pair ...
  82.  
  83.  
  84. Msg#:39952 *UPCO Discussion*
  85. 09-25-89 01:48:18
  86. From: MIKE MAROTTA
  87.   To: GORDON WILLIAMS (Rcvd)
  88. Subj: VIRUS, CONT.
  89. I just rebooted and set the date to January 13th.  (also a Friday) and the two 
  90. executables I ran deleted themselves.
  91. *
  92. The Jerusalem B virus looks for and sets the file attributes with function 43 
  93. of INT 21.
  94.  
  95. Msg#:39958 *UPCO Discussion*
  96. 09-25-89 18:58:45
  97. From: MIKE MAROTTA
  98.   To: LAWRENCE KESTENBAUM (Rcvd)
  99. Subj: JERUSALEM B
  100. (It's getting easier to type Jerusalem... Let's hope no one invents a 
  101. Massachusetts or Connecticut virus...Then there's Azerbaidzhan and don't forget
  102. Armenia's important city, Ordzhonikidze  though perhaps virus wars would be 
  103. preferable to ethnic rioting...)
  104. *
  105.         I found where JB looks for date and day.  I'm  about 2/3 through now 
  106. and I must say, I have respect for the programmer.  Error trapping and 
  107. failsafes all over the place.  The guy knows how to save a byte, also.  If he 
  108. knew that the argument for a call is something, he moves the whole word into AX
  109. instead of MOV AH,12 and MOV AL,34.  He likes to PUSH and POP.  This is the 
  110. "real programmer's" way.  Me, I just MOV in again what I wished I'd PUSHed. 
  111. The program checks for disk type, and of course, changes the ATTRIButes of the 
  112. file.  Lots of error trapping. And it's TSR.  Neat.
  113. *
  114.         Now the next phase is to write a counter-program.  One that looks in 
  115. these places for this and that code and if the code is there, then you change 
  116. it so it's harmless. I already wrote some of this.  I have a program called 
  117. FOXY that goes to COMMAND.COM on a floppy and changes the program with no 
  118. alteration in size or date.  After being acted upon by FOXY, COMMAND.COM boots 
  119. with a message: "I am alive and I have rights."
  120. *
  121.         By the way, the monstrous size of ATTRIB (now at 66K) indicates 
  122. Jerusalem B does NOT write to the "slack" area of a file.  That in itself is a 
  123. challenge.  You can't do all that error trapping in a 256 bytes. Also, the 
  124. reason that FOXY acts only on floppies (and B: at that!) is to avoid just such 
  125. hassles.  The program is 32 bytes long and only because I allowed dead space 
  126. between the code and the message. I could still tighten it up...  But that 
  127. would leave maybe  16 bytes for error trapping.
  128.  
  129. Msg#:40038 *UPCO Discussion*
  130. 10-01-89 09:33:31
  131. From: MIKE MAROTTA
  132.   To: VIRUS HUNTERS
  133. Subj: JERUSALEM B, CONT.
  134. I must be making progress, I now have more questions than answers....
  135. .       sUMsDos is the virus identifier tag.  At least this string appears at 
  136. the head and tail.  Of course, we have seen that EXE files are always 
  137. re-infected, so this mechanism is not perfect.  Also, near the tail of the 
  138. virus is the string EDLIN.  
  139.         I looked at EDLIN and it has a lot of open space, most of it at the end
  140. of the file.  In all, EDLIN has about 2500 bytes available.  The Jerusalem B 
  141. virus runs 1808 bytes.  (This is hardcoded into the virus in several places, 
  142. e.g., MOV CX,0710 before an INT 21 function call.)  I wonder if EDLIN.COM was 
  143. the first host, or perhaps the first intended host.  
  144.         The string COMMAND.COM also shows up.  However, infection of 
  145. COMMAND.COM doesn't go well.  Mine crashed when I tried to invoke another DOS 
  146. shell.
  147.         It has been suggested that JB does NOT infect COMMAND.COM in order to 
  148. make it less detectable, especially asfter the discovery of the "40th 
  149. Anniversary Virus" which infected the command processor.
  150.         I have expressed by admiration for the great attention given to detail 
  151. in JB, but now I'm not so sure it is all necessary.  Now that I have worked my 
  152. way 100% thru the disassembly, I find many block of code that make no sense. 
  153. They do work, but WHY is hardly clear.  (How many times can you PUSH and POP a 
  154. register, load it, add to it and then not use it?
  155.         As for an antidote, Jerusalem B writes itself to the head of a file, or
  156. if you like, it moves the original program down 1808 bytes.  I believe that a 
  157. program that checks three small blocks of code can identify this virus and then
  158. render it harmless by either filling those bytes with 00s, all 1808 of them, or
  159. if more sophisticated, zero out only the bytes of code that do critical work. 
  160. We'll see.
  161.  
  162. Msg#:40219 *UPCO Discussion*
  163. 10-08-89 21:55:55
  164. From: MIKE MAROTTA
  165.   To: DENNIS HILL
  166. Subj: REPLY TO MSG# 40193 (SCAN VIRUS 40)
  167. I tested SCAN40 on the Jerusalem B and it works.  I also infected SCAN40 and 
  168. before it did anything else, it detected its own infection.
  169. *
  170.         I went back to an article I wrote on viruses in January 1989 and found 
  171. that some of what I "discovered" about JB, I quoted earlier about JA.  
  172. *
  173.         I have some theories about undetectable viruses, by the way, which I 
  174. hesitate to share here.  My concern is for Meridian's "right" to a good public 
  175. image.  
  176. *
  177. One note:  When the Academy of Sciences of the USSR was hit by a virus last 
  178. year (har!  that's what they get for copying software!)  they created an 
  179. anit-virus program which they immediately made a "state secret"  (no SHAREware 
  180. in commieland).  This program identifies "  all twelve known viruses".  Quite a
  181. claim!  (I forget the actual number they said. I almost got logged off taking 
  182. time to look but the article I quoted them in was edited for space their 
  183. hassles were not disclosed to the Data General usership...) Anyway, it seems 
  184. that by the standards of SCAN40, the Reds better get cracking on enhancing that
  185. "state secret" so it can hold its own against the publicly available stuff in 
  186. the USA.
  187.  
  188. Msg#:40285 *UPCO Discussion*
  189. 10-10-89 10:41:58
  190. From: MIKE MAROTTA
  191.   To: DISK DOCTORS
  192. Subj: JERUSALEM B
  193. With COM files you can diable the virus by changing the first instruction from 
  194. JMP 0195 to JMP 0810.  
  195.         This fix can be automated. (I'm working on it, but got bogged down in 
  196. Disk Transfer Areas and File Control Blocks just as the lightning rolled 
  197. through town, so I quit.)
  198.         With EXE files, I haven't figured out a neat fix.  I spent the morning 
  199. reading about EXEs.  They start at location 0100 but then are relocated based 
  200. on data in their headers.  The Waite Group's MS-DOS BIBLE had the nerve to call
  201. this "better" than COM files which are "leftover" from CP/M.
  202.  
  203. Msg#:40301 *UPCO Discussion*
  204. 10-11-89 03:08:58
  205. From: MIKE MAROTTA
  206.   To: GORDON WILLIAMS
  207. Subj: REPLY TO MSG# 40290 (JERUSALEM B)
  208. When it acts on COM (not EXE) files, Jerusalem B prepends itself to the 
  209. program, i.e., it writes itself to the first 1808 bytes, pushing the original 
  210. code down.  The first command in JB is a jump, JMP 195.  If you change this to 
  211. JMP 710  (710h = 1808 base 10) then your computer jumps over the infection and 
  212. continues processing normally.  I did it with DEBUG; you can also use Norton's 
  213. etc.  Change the 0195 to 0710.  (Ah, maybe I should check -- as I recall, Intel
  214. has this funny way of placing the Low byte first, so 0195 is really 9501 and 
  215. 0710 is given as 1007.  Anyway, you'll see it, if you look at the infected COM 
  216. file.
  217. *
  218. As I said before, I am still (ahem) hacking my way through the EXEs.  For 
  219. reasons of their own, Intel and Microsoft define EXEs as the "default".  An EXE
  220. file header contains information for loading the program into memory.  So some 
  221. of it is in one segment and some in another.  (I had orginally thought this was
  222. a function of the virus.  (:-))
  223.  
  224.